package com.ivi.car.module.carstate.presenter;

import android.app.Activity;

import com.ivi.car.base.BasePresenter;
import com.ivi.car.bean.carstate.CarPartState;
import com.ivi.car.module.carstate.model.IStateContract;
import com.ivi.car.module.carstate.model.StateModel;
import com.trello.rxlifecycle2.LifecycleProvider;

import java.util.ArrayList;

/**
 * Copyright
 * author chengxp
 * date 2018/3/6
 * describe
 * history
 */

public class StatePresenter extends BasePresenter<IStateContract.View> implements IStateContract.Presenter {

    private final StateModel mStateModel;
    private ArrayList<CarPartState> mStateList;

    public StatePresenter(IStateContract.View view, LifecycleProvider provider) {
        super(view, provider);
        mStateModel = new StateModel(provider);
    }

    @Override
    public void startActivity(Activity activity) {

    }

    @Override
    public void showPartsState(){
        ArrayList<CarPartState> list = mStateModel.getPartsState();
        mView.showPartsState(list);
    }
}
